#include "modelvolume.h"



modelVolume::modelVolume(int width, int height, int depth)
{
    this->width = width;
    this->height = height;
    this->depth = depth;
    volume = new Block[width * height * depth];
    for(int i = 0; i < width * height * depth; i++) {
        volume[i].type = Block_Air;
    }
    getBlock(0, 0, 0)->type = Block_Dirt;
}

Block* modelVolume::getBlock(int x, int y, int z) {
    int index = (z * width * height) + (y * width) + x;
    return &volume[index];
}
